Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for parents pressure for selection #22

Merged
merged 3 commits into from
Jun 26, 2017
Merged

changes for parents pressure for selection #22

merged 3 commits into from
Jun 26, 2017

Conversation

rgupta90
Copy link
Collaborator

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.2%) to 75.0% when pulling 65ff473 on issues_fix into e52cb07 on master.

Copy link
Owner

@lacava lacava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good except for a couple things noted in my comments

few_score = learner.score(features[:300], target[:300])
test_score = learner.score(features[300:],target[300:])

lasso = LassoLarsCV()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the lasso model fitting.

lasso_score = lasso.score(features[:300], target[:300])
print("few score:",few_score,"lasso score:",lasso_score)
print("few test score:",test_score,"lasso test score:",lasso.score(features[300:],target[300:]))
assert few_score >= lasso_score
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to check the score with an assertion

few/variation.py Outdated
elif hasattr(self.ml,'feature_importances_'):
# for tree methods, filter our individuals with 0 feature importance
offspring = copy.deepcopy(list(x for i,x in zip(self.ml.feature_importances_, self.valid(parents)) if i != 0))
if self.weight_parents:
weights = abs(self.ml.feature_importances_)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feature importances are always positive so you can remove the abs() from this one

@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 74.752% when pulling 05ef0c4 on issues_fix into e52cb07 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.6%) to 76.418% when pulling d5bc3ab on issues_fix into e52cb07 on master.

@lacava lacava merged commit b6310de into master Jun 26, 2017
@lacava lacava deleted the issues_fix branch July 5, 2017 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants